procedure TForm1.ButtonKind(PenMode :TPenMode); begin Image1.Canvas.Pen.Mode := PenMode; // ±×¸²À» ±×¸± ¶§. if DrawBtn.Down = True then Image1.Canvas.LineTo(MPoint.X, MPoint.Y); // ¼±À» ±×¸± ¶§. if LineBtn.Down = True then begin Image1.Canvas.MoveTo(StartDot.X, StartDot.Y); Image1.Canvas.LineTo(MPoint.X, MPoint.Y); end; // »ç°¢ÇüÀ» ±×¸± ¶§. if RectBtn.Down = True then Image1.Canvas.Rectangle(StartDot.X, StartDot.Y, MPoint.X, MPoint.Y); // ¿øÀ» ±×¸± ¶§. if EllipseBtn.Down = True then Image1.Canvas.Ellipse(StartDot.X, StartDot.Y, MPoint.X, MPoint.Y); // µÕ±Ù »ç°¢ÇüÀ» ±×¸± ¶§. if Round.Down = True then Image1.Canvas.RoundRect(StartDot.X, StartDot.Y, MPoint.X, MPoint.Y (StartDot.X - MPoint.X) div 2, (StartDot.Y - MPoint.Y) div 2); // Áö¿ì°³. if EraseBtn.Down = True then begin Image1.Canvas.Pen.Mode := pmWhite; Image1.Canvas.LineTo(MPoint.X, MPoint.Y); end; // ¼±ÅÃµÈ °ø°£ ä¿ì±â. if FillBtn.Down = True then begin Image1.Canvas.Brush.Color := ColorGrid1.ForegroundColor; Image1.Canvas.FloodFill((StartDot.X), (StartDot.Y), ColorGrid1.ForegroundColor.fSSURFACE); Image1.Canvas.Brush.Color := clWhite; end; end;